<?php
class Geetest extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
    }
	
	public function start()
	{
		$this->load->library('geetestlib');
		session_start();
		$data = array(
			"user_id" => time(), # 网站用户id
			"client_type" => "h5", #web:电脑上的浏览器；h5:手机上的浏览器，包括移动应用内完全内置的web_view；native：通过原生SDK植入APP应用的方式
			"ip_address" => getip(),
		);
		$status = $this->geetestlib->pre_process($data, 1);
		$_SESSION['gtserver'] = $status;
		$_SESSION['geeet_id'] = $data['user_id'];
		echo $this->geetestlib->get_response_str();
	}
}


